package com.tornado.community.controller;

import com.tornado.community.dto.ImgUploadDto;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class FileController {

    @PostMapping("/file/img/upload")
    @ResponseBody
    public ImgUploadDto uploadImg(){
        ImgUploadDto imgUploadDto = new ImgUploadDto();
        imgUploadDto.setSuccess(1);
        imgUploadDto.setMessage("成功");
        imgUploadDto.setUrl("/static/testImages/avatar.jpg");
        return imgUploadDto;
    }
}
